using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization;
using System.Collections.Generic;

using ZoneFiveSoftware.Common.Data;
using ZoneFiveSoftware.Common.Data.Fitness;
using ZoneFiveSoftware.Common.Data.GPS;
using ZoneFiveSoftware.Common.Visuals;

using BENBUN.Properties;
using BENBUN.UI.SendTweet;


namespace BENBUN.ST_Twitter
{
    partial class  SendToTwitter : IAction
    {
        public SendToTwitter(IList<IActivity> activities)
        {
            this.activity = activities[0];
        }

        #region IAction Members

        public bool Enabled
        {
            get { return activity != null; }
        }

        public bool HasMenuArrow
        {
            get { return false; }
        }

        public Image Image
        {
            get { return Properties.Resources.twitter_icon_16; }
        }

        public void Refresh()
        {
        }

        public void Run(Rectangle rectButton)
        {
            Tweet tweetForm = new Tweet();
            tweetForm.activity = activity;
            tweetForm.ShowDialog();
   
        }

        public string Title
        {
            get { return Resources.StringResources.ExportText; }
        }

        #endregion

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        private void Export(string filename)
        {

        }

        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private IActivity activity = null;
    }
}
